package com.wjy.simple.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;

import com.wjy.simple.R;
import com.wjy.simple.activity.StickyListDemoActivity;


/**
 * Created by wangjingyuan on 15/7/31.
 */
public class DemoFragment extends BaseFragment implements View.OnClickListener {
    private View rootView;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        rootView = inflater.inflate(R.layout.fragment_demo, container, false);
        return rootView;
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        mToolBar.setTitle("无需网络");
        view.findViewById(R.id.btn_sticky).setOnClickListener(this);
    }

    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        inflater.inflate(R.menu.demo, menu);
    }

    @Override
    public void onClick(View v) {
        goToOthers(StickyListDemoActivity.class);
    }

    @Override
    public boolean isShowBackButton() {
        return false;
    }
}
